package com.aiyige.model.db;

import org.litepal.annotation.Encrypt;
import org.litepal.crud.DataSupport;

/**
 * Created by xiachao on 2017/8/14.
 * <p>
 * //1. list条件查询
 * List<Book> books = Book.find(Book.class, "author = ?", new String{"Alex"});
 * //2. bean条件查询
 * Book.find(Book.class, "name = ? and anthor = ?", "金瓶梅", "Alex");
 * //3. 条件查询，以此是分组，排序，limit查询
 * find(Class<T> type, String whereClause, String[] whereArgs, String groupBy, String orderBy, String limit)
 * //4. 自定义查询，依然支持查询语句查询
 * // Could execute other raw queries too here..
 * Note.executeQuery("VACUUM");
 * // for finders using raw query.
 * List<Note> notes = Note.findWithQuery(Note.class, "Select * from Note where name = ?", "satya");
 */

public class FavouriteDbEntity extends DataSupport {
    public String getIsbn() {
        return isbn;
    }


    public FavouriteDbEntity setIsbn(String isbn) {
        this.isbn = isbn;
        return this;
    }

    public String getTitle() {
        return title;
    }

    public FavouriteDbEntity setTitle(String title) {
        this.title = title;
        return this;
    }

    public String getEdition() {
        return edition;
    }

    public FavouriteDbEntity setEdition(String edition) {
        this.edition = edition;
        return this;
    }
//    @Column(unique = true, defaultValue = "unknown")
    String isbn;
    @Encrypt(algorithm = AES)
    String title;
    @Encrypt(algorithm = AES)
    String edition;
    public FavouriteDbEntity() {
    }

    @Override
    public long getBaseObjId() {
        return super.getBaseObjId();
    }
}
